package com.shy;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationListener;
import org.springframework.core.io.support.SpringFactoriesLoader;

import java.util.List;

public class SPITest {
    public static void main(String[] args) {
        List<String> spiTests = SpringFactoriesLoader.loadFactoryNames(ApplicationListener.class, null);
        spiTests.forEach(System.out::println);
        System.out.println("=====================================");
        List<ApplicationListener> listeners = SpringFactoriesLoader.loadFactories(ApplicationListener.class, null);
        listeners.forEach(System.out::println);
    }
}
